<template>
  <van-card
      v-for="user in props.userList"
      :desc="user.profile"
      :title="`${user.userName} (编号：${user.planetCode})`"
      :thumb="user.avatarUrl"
  >
    <template #tag>
      <van-tag plain type="danger" v-if="user.gender === 1">{{ '男' }}</van-tag>
      <van-tag plain type="danger" v-else>{{ '女' }}</van-tag>
    </template>
    <template #tags>
      <van-space wrap>
        <van-tag plain type="danger" v-for="tag in user.tags">{{ tag }}</van-tag>
      </van-space>
    </template>
    <template #footer>
      <van-button size="small">联系我</van-button>
    </template>
  </van-card>
</template>

<script setup lang="ts">

import {userType} from "../models/user";

interface UserCardListProps {
  userList: userType;
}

const props = withDefaults(defineProps<UserCardListProps>(), {
  // @ts-ignore
  userList: []
});


</script>

<style scoped>

</style>